<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Gloze: all</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Gloze
   &#160;<span id="projectnumber">1.01-beta2</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="components.html">Schema Components</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">all </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>The 'all' compositor allows all combinations of its child elements. The ordering of these elements may be significant. Child elements may be optional (with minimum occurrences of 0) as in the example below with an element 'bar', but a <em>missing</em> 'foo' element..</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span>?&gt;
&lt;foobar xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span>&gt;
        &lt;bar&gt;foobar&lt;/bar&gt;
&lt;/foobar&gt;


</pre></div> <div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

&lt;http:<span class="comment">//example.org/all.xml&gt;</span>
      ns1:foobar
              [ ns1:bar <span class="stringliteral">&quot;foobar&quot;</span>^^xs_:string
              ] .
</pre></div><p>This example demonstrates that compositors like 'all' don't explicitly appear in the RDF model nor in the OWL ontology. In the schema below, 'foo' and 'bar' are defined locally so are not included in the (global elements and attributes) closure. They are described as datatype properties with unknown range. The types that appear in the schema are translated as 'allValuesFrom' restrictions in the context of a class definition.</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
&lt;xs:schema xmlns:xs=<span class="stringliteral">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> 
        targetNamespace=<span class="stringliteral">&quot;http://example.org/&quot;</span> xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span> 
        elementFormDefault=<span class="stringliteral">&quot;qualified&quot;</span>&gt;

        &lt;xs:element name=<span class="stringliteral">&quot;foobar&quot;</span>&gt;
                &lt;xs:complexType mixed=<span class="stringliteral">&quot;true&quot;</span>&gt;
                        &lt;xs:all&gt;
                                &lt;xs:element name=<span class="stringliteral">&quot;foo&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span> minOccurs=<span class="stringliteral">&quot;0&quot;</span>/&gt;
                                &lt;xs:element name=<span class="stringliteral">&quot;bar&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;
                        &lt;/xs:all&gt;
                &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;

&lt;/xs:schema&gt;
</pre></div><p>Because 'foo' is optional, it has a maximum cardinality of 1 but an implied minimum cardinality of 0.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix rdfs:    &lt;http:<span class="comment">//www.w3.org/2000/01/rdf-schema#&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix owl:     &lt;http:<span class="comment">//www.w3.org/2002/07/owl#&gt; .</span>
@prefix xsd:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

ns1:bar
      a       rdf:Property , owl:DatatypeProperty .

ns1:foobar
      a       owl:ObjectProperty ;
      rdfs:range
              [ a       owl:Class ;
                rdfs:subClassOf
                        [ a       owl:Restriction ;
                          owl:cardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                          owl:onProperty ns1:bar
                        ] ;
                rdfs:subClassOf
                        [ a       owl:Restriction ;
                          owl:allValuesFrom xsd:string ;
                          owl:onProperty ns1:foo
                        ] ;
                rdfs:subClassOf
                        [ a       owl:Restriction ;
                          owl:maxCardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                          owl:onProperty ns1:foo
                        ] ;
                rdfs:subClassOf
                        [ a       owl:Restriction ;
                          owl:allValuesFrom xsd:string ;
                          owl:onProperty ns1:bar
                        ]
              ] .

ns1:foo
      a       rdf:Property , owl:DatatypeProperty .

&lt;http:<span class="comment">//example.org/all.owl&gt;</span>
      a       owl:Ontology .
</pre></div><h2><a class="anchor" id="annotationChildren"></a>
Child components</h2>
<ul>
<li><a class="el" href="element.html">element</a> </li>
</ul>
</div></div>


<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 15 2011 22:13:50 for Gloze by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
